{-# OPTIONS -Wall #-}

--------------------------------------------------------------------------------
-- |
-- Module      :  Wumpus.FontPic.Datatypes
-- Copyright   :  (c) Stephen Tetley 2012
-- License     :  BSD3
--
-- Maintainer  :  stephen.tetley@gmail.com
-- Stability   :  unstable
-- Portability :  GHC
--
-- Datatypes for /properties/ files.
--
--------------------------------------------------------------------------------

module Wumpus.FontPic.Datatypes
  ( 
    FaceSpec(..)
  , CharSpec(..)
  , Outline(..)
  ) where

import qualified Data.Map as M


data FaceSpec = FaceSpec
    { font_name         :: String
    , family_name       :: String
    , style_name        :: String
    , font_bbox         :: (Int,Int,Int,Int)
    , units_per_em      :: Int
    , face_ascender     :: Int
    , face_descender    :: Int
    , face_height       :: Int
    , char_metrics      :: M.Map Char CharSpec
    , char_outlines     :: M.Map Char [Outline] 
    }
  deriving (Show)

data CharSpec  = CharSpec
    { char_id           :: Char
    , char_width        :: Int
    , char_weight       :: Int
    , char_advance      :: (Int,Int)
    }
  deriving (Eq,Show)

data Outline = Moveto   Int Int
             | Lineto   Int Int
             | Conicto  Int Int Int Int
             | Curveto  Int Int Int Int Int Int
  deriving (Eq,Show)